import { BasicColumn } from '@/components/Table';
import { FormSchema } from '@/components/Table';
export const columns: BasicColumn[] = [
  {
    title: '字典类型名称',
    dataIndex: 'name',
    width: 200,
  },
  {
    title: '字典值',
    dataIndex: 'code',
    width: 180,
  },
  {
    title: '排序',
    dataIndex: 'sort',
    width: 50,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 180,
  },
  {
    title: '备注',
    dataIndex: 'remark',
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '字典名称',
    component: 'Input',
    colProps: { span: 12 },
  },
  {
    field: 'code',
    label: '字典编码',
    component: 'Input',
    colProps: { span: 12 },
  },
];

export const formSchema: FormSchema[] = [
  {
    field: 'id',
    label: '字典类型id',
    component: 'Input',
    show: false,
  },
  {
    field: 'name',
    label: '类型名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'code',
    label: '类型编码',
    required: true,
    component: 'Input',
  },
  {
    field: 'sort',
    label: '排序',
    required: true,
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
  },
];

export const dataColumns: BasicColumn[] = [
  {
    title: '字典名称',
    dataIndex: 'value',
    width: 200,
  },
  {
    title: '字典值',
    dataIndex: 'code',
    width: 180,
  },
  {
    title: '排序',
    dataIndex: 'sort',
    width: 50,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 180,
  },
  {
    title: '备注',
    dataIndex: 'remark',
  },
];

// 字典明细查询
export const searchDataFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '字典名称',
    component: 'Input',
    colProps: { span: 12 },
  },
  {
    field: 'typeId',
    label: '',
    component: 'Input',
    show: false,
  },
];
// 字典表单
export const dataFormSchema: FormSchema[] = [
  {
    field: 'id',
    label: '字典id',
    component: 'Input',
    show: false,
  },
  {
    field: 'typeId',
    label: '',
    component: 'Input',
    show: false,
  },
  {
    field: 'value',
    label: '字典名称',
    required: true,
    component: 'Input',
  },
  {
    field: 'code',
    label: '字典编码',
    required: true,
    component: 'Input',
  },
  {
    field: 'ext1',
    label: '扩展1',
    component: 'Input',
  },
  {
    field: 'ext2',
    label: '扩展2分类标识',
    component: 'Input',
  },
  {
    field: 'ext3',
    label: '扩展3',
    component: 'Input',
  },

  {
    field: 'ext4',
    label: '扩展4',
    component: 'Input',
  },
  {
    field: 'ext5',
    label: '扩展5',
    component: 'Input',
  },
  {
    field: 'ext6',
    label: '扩展6',
    component: 'Input',
  },
  {
    field: 'sort',
    label: '排序',
    required: true,
    component: 'InputNumber',
  },
  {
    label: '备注',
    field: 'remark',
    component: 'InputTextArea',
  },
];
